#include "Pipe.h"

Pipe::Pipe(D3DXVECTOR2 pos, EObjectType realType,EState state) :GameObject(pos,EObjectType::EPipe,state)
{
	this->realType = realType;
	switch(realType)
	{
	case EPipe_Down:	
		m_pSprite = new CSprite(ResourceManager::GetIns()->GetTexture(PIPE_ID),1,1,1,0,0);
		directToChange = Colls_Bot;
		break;
	case EPipe_Up:
		m_pSprite = new CSprite(ResourceManager::GetIns()->GetTexture(PIPE_ID),1,1,1,0,0);
		directToChange = Colls_None;
		break;
	case EPipe_Right:
		m_pSprite = new CSprite(ResourceManager::GetIns()->GetTexture(PIPE2_ID),1,1,1,0,0);
		directToChange = Colls_Right;
		break;
	case EPipe_BotTom:
		m_pSprite = new CSprite(ResourceManager::GetIns()->GetTexture(PIPE3_ID),1,1,1,0,0);
		directToChange = Colls_Top;
		break;
	}
}

Pipe::~Pipe()
{
	GameObject::~GameObject();
}
